<template>
  <div>
    <h1>{{ count }}</h1>
    <input type="number" @input="setTitle" :value="c" />
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  data() {
    return {
      c: 0
    };
  },
  computed: {
    ...mapGetters(["count"])
  },
  methods: {
    setTitle(e) {
      this.c = e.target.value;

      return this.$store.commit("increment", this.c);
    }
  }
  // render(createElement, context) {
  //   return <div>
  //     <a-button></a-button>
  //   </div>;
  // }
};
</script>